import { Controller } from '@/controller'

export function addCompanyId(input: RequestInfo | URL, init?: RequestInit): { input: RequestInfo | URL, init?: RequestInit } {
    
    if (Controller.instance.company) {
        init = {
            ...init,
            headers: {
                ...init?.headers,
                'company-id': Controller.instance.company,
            }
        }
    }
    return { input, init }
}